package com.yanrumiao.entity;

import cc.uncarbon.framework.crud.entity.HelioBaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.yanrumiao.enumns.OrdersStatusEnum;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import io.swagger.v3.oas.annotations.media.Schema;
import java.io.Serial;
import java.math.BigDecimal;


/**
 * 订单
 */
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
@Data
@TableName(value = "orders")
public class OrdersEntity extends HelioBaseEntity<Long> {

    @Serial
    private static final long serialVersionUID = 1L;


    @Schema(description = "订单编号")
    @TableField(value = "order_no")
    private String orderNo;

    @Schema(description = "用户id")
    @TableField(value = "user_id")
    private Long userId;

    @Schema(description = "实际需要支付的价格，单位分，优惠前")
    @TableField(value = "price")
    private BigDecimal price;

    @Schema(description = "实际支付金额")
    @TableField(value = "pay_money")
    private BigDecimal payMoney;

    @Schema(description = "用户代金券id")
    @TableField(value = "user_coupon_id")
    private Long userCouponId;

    @Schema(description = "用户等级")
    @TableField(value = "vip_level")
    private Integer vipLevel;

    @Schema(description = "美容师id")
    @TableField(value = "staff_id")
    private Long staffId;

    @Schema(description = "备注")
    @TableField(value = "remark")
    private String remark;

    @Schema(description = "状态")
    @TableField(value = "status")
    private OrdersStatusEnum status;

    @Schema(description = "店铺id")
    @TableField(value = "store_id")
    private Long storeId;

    @Schema(description = "项目id")
    @TableField(value = "item_id")
    private Long itemId;

    @Schema(description = "项目名称")
    @TableField(value = "item_name")
    private String itemName;
}
